package fun.symtable;

import java.util.Iterator;

public class FunctionIterator extends SymbolTableIterator<FunctionEntry> {
    public FunctionIterator(SymbolTable table, Iterator<FunctionEntry> iterator) {
	super(table, iterator);
    }

    public boolean hasNext() {
	if (true == iterator.hasNext())
	    return true;
	// now iter.hasNext() is false
	table = table.getParent();
	// if parent symtable is null
	if (null == table)
	    return false;
	iterator = table.functions();
	return iterator.hasNext();
    }
}
